/** 
 * Description:首页广告管理
 * Date:2013-1-31
 * Author:Along	
*/
package com.community.shopping.service.logic;

import java.util.List;
import org.springframework.stereotype.Service;
import com.community.shopping.dao.IndexAdvDao;
import com.community.shopping.domain.IndexAdv;
@Service  
public class IndexAdvManager {
	
	private IndexAdvDao indexAdvDao;
	/**
	 * @param goodsTypeDao the goodsTypeDao to set
	 */
	public void setIndexAdvDao(IndexAdvDao indexAdvDao) {
		this.indexAdvDao = indexAdvDao;
	}

	public IndexAdv getIndexAdv(Integer id){
		return indexAdvDao.getIndexAdv(id);
	}
	public void save(IndexAdv indexAdv){
		indexAdvDao.save(indexAdv);
	}

	public void delete(IndexAdv indexAdv){		  
		indexAdvDao.delete(indexAdv);
	}

	public List<IndexAdv> getIndexAdvs(Integer shopId) {  		
		 return indexAdvDao.getIndexAdv("  status=1 and shopId="+shopId+" order by sort,id");
		 }
	

	public List<IndexAdv> getIndexAdvs(String sql){
		return indexAdvDao.getIndexAdv(sql);
	}   

}
